let payThis = {
    limit: {},
    integral: {},
    voucher: {},
    cash: {},
};



for (let i in payThis) {
    let item = payThis[i];

    Object.defineProperties(item, {
        use: {
            enumerable: true,
            get() {
                console.log("get: ", this);
                return (this._use - 0);
            },
            set(val) {
                val = typeof val === "nunmber" ? val.toSting() : val;
                this._use = val.replace(/^0|[\D]/g, '');
                // console.log("set: ", val, this);
            }
        },
        _use: {
            value: 0,
            writable: true,
            enumerable: false
        },
        canuse: {
            value: 300,
            writable: false,
            enumerable: true,
            configurable: false

        },
        status: {
            value: true,
            writable: false,
            enumerable: true,
            configurable: false

        }
    });
}